{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The autoreload extension is already loaded. To reload it, use:\n",
      "  %reload_ext autoreload\n"
     ]
    }
   ],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "import os\n",
    "import sys\n",
    "import warnings\n",
    "sys.path.append('../')  # |返回notebook的上一级目录\n",
    "warnings.filterwarnings(\"ignore\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "%run ..\\utils\\params.py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'mode': 'train',\n",
       " 'max_enc_len': 460,\n",
       " 'max_dec_len': 52,\n",
       " 'batch_size': 64,\n",
       " 'epochs': 4,\n",
       " 'vocab_path': 'E:\\\\GitHub\\\\QA-abstract-and-reasoning\\\\data\\\\wv\\\\vocab_index_pad.txt',\n",
       " 'learning_rate': 0.01,\n",
       " 'adagrad_init_acc': 0.1,\n",
       " 'max_grad_norm': 0.8,\n",
       " 'vocab_size': 32247,\n",
       " 'beam_size': 3,\n",
       " 'embed_size': 300,\n",
       " 'enc_units': 256,\n",
       " 'dec_units': 256,\n",
       " 'attn_units': 64,\n",
       " 'train_seg_x_dir': 'E:\\\\GitHub\\\\QA-abstract-and-reasoning\\\\data\\\\train_x.txt',\n",
       " 'train_seg_y_dir': 'E:\\\\GitHub\\\\QA-abstract-and-reasoning\\\\data\\\\train_y.txt',\n",
       " 'test_seg_x_dir': 'E:\\\\GitHub\\\\QA-abstract-and-reasoning\\\\data\\\\test_x.txt',\n",
       " 'checkpoints_save_steps': 2,\n",
       " 'min_dec_steps': 4,\n",
       " 'max_train_steps': 1296,\n",
       " 'train_pickle_dir': '/opt/kaikeba/dataset/',\n",
       " 'save_batch_train_data': False,\n",
       " 'load_batch_train_data': False}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "from utils.params import get_params_from_dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "开始check数据集参数\n",
      "开始写入参数\n"
     ]
    }
   ],
   "source": [
    "params_from_dataset = get_params_from_dataset(True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:tf2.0]",
   "language": "python",
   "name": "conda-env-tf2.0-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
